Beginning Jakarta EE Web Development by Luciano Manelli & Giulio Zambon

Beginning Jakarta EE Web Development by Luciano Manelli & Giulio Zambon

Author:Luciano Manelli & Giulio Zambon
Language: eng
Format: epub
ISBN: 9781484258668
Publisher: Apress


fmt:setLocale, fmt:setBundle, fmt:setMessage, and fmt:param

Suppose that you want to support English and Italian. The first thing you have to do is identify all the strings that are going to be different in the two languages and define two bundles, one for each language (see Listings 6-21 and 6-22).package myPkg.i18n;

import java.util.*;

public class MyBundle_en extends ListResourceBundle {

public Object[][] getContents() {return contents;}

static final Object[][] contents = {

{"login.loginmess","Please login with ID and password"},

{"login.submit","Submit"},

{"login.choose","Choose the language"},

{"login.english","English"},

{"login.italian","Italian"}

};

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.